from goods.models import SKU,SKUImage
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet
from meiduo_admin.utils import PageNum
from meiduo_admin.serializers.images import SKUImageSerializer


class ImageView(ModelViewSet):
    # 指定序列化器
    serializer_class = SKUImageSerializer
    # 指定数据的查询集
    queryset = SKUImage.objects.all()
    # 指定权限
    permission_classes = [IsAdminUser]
    # 指定分页器
    pagination_class = PageNum


